
package com.shop.cloud.mall.api.controller;

import com.shop.cloud.common.core.constant.CommonConstants;
import com.shop.cloud.common.core.constant.SecurityConstants;
import com.shop.cloud.common.core.util.R;
import com.shop.cloud.upms.common.entity.SysUser;
import com.shop.cloud.upms.common.feign.FeignUserService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * 客服接口
 *
 * @author
 * @date 2020-03-17 11:55:32
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/customerservice")
@Tag(description = "customerservice", name = "客服接口API")
public class CustomerServiceController {

    private final FeignUserService feignUserService;

    /**
     * 客服列表
     * @return
     */
    @Operation(summary = "分页列表")
    @GetMapping("/list")
    public R getPage(SysUser sysUser) {
        sysUser.setIsKefu(CommonConstants.YES);
		return feignUserService.getInsideUserList(sysUser, SecurityConstants.FROM_IN);
    }

}
